#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main()
{
	int numInputs;
	int numHidden;
	int numLogistic;
	int numOutput;
	cerr<<"//Enter number of inputs\n";
	cin>>numInputs;
	cerr<<"//enter number of hidden\n";
	cin>>numHidden;
	cerr<<"//Enter number of logistic\n";
	cin>> numLogistic;
	cerr<<"//Enter number of output\n";
	cin>>numOutput;
	
	cerr<<"\n\n\n\n";
	
	cout<<"// neurons\n";
	cout<<"#neurons;"<<numInputs+numHidden+numOutput<<"\n";
	cout<<"// for axonfamily, 't' stands for tanh; 'g' for logistic, 'l' for linear\n// type;ID;layer;flatness;axonfamily;momentum;learningrate\n// Input layer:\n";
	
	for(int i = 0; i < numInputs; i++)
		cout<<"i;"<<i<<";0\n";
	
	cout<<"// hidden layer\n";
	
	for(int h = 0; h< numHidden; h++)
	{
		cout<<"n;"<<h+numInputs<<";1;1;";
		if(h<numLogistic)
			cout<<"l;0.5;1\n";
		else cout<<"t;0.5;1\n";
	}
	
	cout<<"// output layer \n";
	for(int o = 0; o < numOutput; o++)
		cout<<"n;"<<o+numInputs+numHidden<<";2;1;l;0.5;1\n";
	
	cout<<"// synapses\n// type; ID; sourceunit; targetunit\n";
	
	//input to hiddens
	cout<<"#synapses;"<<numInputs*numHidden+numHidden*numOutput<<"\n";
	
	int synid=0;
	
	for(int i = 0; i < numInputs; i++)
	{
		for(int h = 0; h< numHidden; h++)
		{
			cout<<"s;"<<synid<<";"<<i<<";"<<h+numInputs<<"\n";
			synid++;
		}
	}
	
	for(int h = 0; h < numHidden; h++)
	{
		for(int o = 0; o< numOutput; o++)
		{
			cout<<"s;"<<synid<<";"<<h+numInputs<<";"<<o+numInputs+numHidden<<"\n";
			synid++;
		}
	}
		
	
	return 0;
}

